<script lang="ts" setup>
import {ref} from "vue";
import UriPane from './uri-pane.vue'

defineOptions({name: "SystemSetting"})


const active = ref('base');
const uriPaneRef = ref();
const onTabChange = (name: string) => {
    switch (name) {
        case 'uri':
            uriPaneRef.value.refresh();
            break;
    }
}
</script>
<template>
    <main-page>
        <el-card shadow="never" style="height: 100%">
            <el-tabs v-model="active" tab-position="top" @tab-change="onTabChange">

                <el-tab-pane label="系统设置" name="base">
<!--                    <el-form ref="form" :model="sys" label-width="100px" style="margin-top: 20px;">-->
<!--                        <el-form-item label="系统名称">-->
<!--                            <el-input v-model="sys.name"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="LogoUrl">-->
<!--                            <el-input v-model="sys.logoUrl"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="登录开关">-->
<!--                            <el-switch v-model="sys.login"></el-switch>-->
<!--                            <div class="el-form-item-msg" data-v-b33b3cf8="">关闭后普通用户无法登录，仅允许管理员角色登录</div>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="密码验证规则">-->
<!--                            <el-input v-model="sys.passwordRules"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="版权信息">-->
<!--                            <el-input v-model="sys.copyright" :autosize="{minRows: 4}" type="textarea"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item>-->
<!--                            <el-button type="primary">保存</el-button>-->
<!--                        </el-form-item>-->
<!--                    </el-form>-->
                </el-tab-pane>

                <uri-pane ref="uriPaneRef" />

                <el-tab-pane label="短信配置" name="two">
<!--                    <el-form ref="form" :model="msg" label-width="100px" style="margin-top: 20px;">-->
<!--                        <el-form-item label="短信开关">-->
<!--                            <el-switch v-model="msg.open"></el-switch>-->
<!--                            <div class="el-form-item-msg" data-v-b33b3cf8="">关闭后用户无法收到短信，但日志中将记录</div>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="appKey">-->
<!--                            <el-input v-model="msg.appKey"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="secretKey">-->
<!--                            <el-input v-model="msg.secretKey"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item>-->
<!--                            <el-button type="primary">保存</el-button>-->
<!--                        </el-form-item>-->
<!--                    </el-form>-->
                </el-tab-pane>

            </el-tabs>
        </el-card>
    </main-page>
</template>
<style>
.kt-operation {
    width: 100%;

    .el-button + .el-button{
        margin: 0;
    }
}
</style>
